package ru.ifmo.swing.genetics.monitoring.string;

import org.uncommons.watchmaker.framework.PopulationData;
import ru.ifmo.swing.genetics.monitoring.common.AbstractChartDataProvider;

/**
 * @author avhaliullin
 */
public class WordLengthProvider extends AbstractChartDataProvider<String> {
    public WordLengthProvider(String name) {
        super(name);
    }

    public double getValue(PopulationData<? extends String> populationData) {
        return populationData.getBestCandidate().length();
    }

}
